package com.kaplan.hackathon.dynamodb;

import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider;
import com.amazonaws.regions.Region;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient;

public class DynamoDBClient {

	private static AmazonDynamoDBClient instance = null;
	
	protected DynamoDBClient() {
	}
	
	public static AmazonDynamoDBClient getInstance() {
		if (instance == null) {
			instance = new AmazonDynamoDBClient(new ClasspathPropertiesFileCredentialsProvider());
			Region usWest2 = Region.getRegion(Regions.US_EAST_1);
			instance.setRegion(usWest2);
		}
		return instance;
	}
}
